package com.jtyoui.hdfs;

import java.io.IOException;

import com.jtyoui.path.Address;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;

public class DeleteDirectory {
    public static void main(String[] args) throws IOException {
        System.setProperty("HADOOP_USER_NAME", "hadoop");
        Configuration conf = new Configuration();
        FileSystem fs = FileSystem.get(conf);
        Path path = new Path(Address.HADOOP_PATH.toString() + "/hello");
        fs.delete(path,true);
        fs.close();
    }
}

